Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point email footer links to correct sites #1247

Merged
merged 1 commit into from
Mar 20, 2017
Merged

Conversation

monfresh
Copy link
Contributor

Why: Up until now, we had placeholder links in the email footer
because we didn't have sites to point them to. Now that we do, we need
to update the links.

Note that the https://login.gov/policy link doesn't seem to be live yet.
I'm not sure if that's the wrong URL or if the page hasn't been
published yet.

@zachmargolis
Copy link
Contributor

Re: /policy, the page hasn't been published, I can send you the link on Slack to the current preview URL

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for updating these

@@ -94,9 +94,11 @@ html xmlns="http://www.w3.org/1999/xhtml"
tr
th
p.text-center
a href="#" = t('mailer.about', app: APP_NAME)
a href="#{MarketingSite.base_url}"
= t('mailer.about', app: APP_NAME)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to quote this IIRC:

a href=MarketingSite.base_url

@@ -1,6 +1,10 @@
class MarketingSite
BASE_URL = URI('https://login.gov').freeze

def self.base_url
BASE_URL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's .to_s this for consistency?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anything in a view will have to_s called on it by default (HELLO RAILS ✨ ).

I think you know this and so you are suggesting that we call to_s here so we know in our tests we are testing the correct behavior? Want to make sure I understand

@@ -94,9 +94,11 @@ html xmlns="http://www.w3.org/1999/xhtml"
tr
th
p.text-center
a href="#" = t('mailer.about', app: APP_NAME)
a href="#{MarketingSite.base_url}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thoughts on using a link_to helper instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I went for at first but couldn't get it to work for some reason. The email wouldn't even get sent! If you know how, please let me know. I'll try it again too.

@@ -1,6 +1,10 @@
class MarketingSite
BASE_URL = URI('https://login.gov').freeze

def self.base_url
BASE_URL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anything in a view will have to_s called on it by default (HELLO RAILS ✨ ).

I think you know this and so you are suggesting that we call to_s here so we know in our tests we are testing the correct behavior? Want to make sure I understand

@monfresh monfresh force-pushed the mb-fix-email-footer-links branch 2 times, most recently from d6bd4f8 to a4de40a Compare March 20, 2017 16:36
@monfresh
Copy link
Contributor Author

@jessieay The link_to is working now. Not sure what happened the first time.
@zachmargolis I removed the quotes and added to_s and a service spec.
PTAL.

Copy link
Contributor

@jessieay jessieay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆒 🐷

@zachmargolis
Copy link
Contributor

@jessieay re: to_s I just wanted to make sure we had strings, because URIs look and act almost like strings, but not quite, and I figure strings are more common to pass around? I guess I'd be OK if we switched them all to URI objects, but at the very least I think everything coming out of MarketingSite should be consistent

**Why**: Up until now, we had placeholder links in the email footer
because we didn't have sites to point them to. Now that we do, we need
to update the links.

Note that the https://login.gov/policy link doesn't seem to be live yet.
I'm not sure if that's the wrong URL or if the page hasn't been
published yet.
@monfresh monfresh merged commit 8d33022 into master Mar 20, 2017
@monfresh monfresh deleted the mb-fix-email-footer-links branch March 20, 2017 17:10
pkarman pushed a commit that referenced this pull request Mar 20, 2017
**Why**: Up until now, we had placeholder links in the email footer
because we didn't have sites to point them to. Now that we do, we need
to update the links.

Note that the https://login.gov/policy link doesn't seem to be live yet.
I'm not sure if that's the wrong URL or if the page hasn't been
published yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants